package java69.work720;

public class Cat extends Pet {
    public Cat() {
    }
    public String catchMouse(){
        return "抓老鼠";
    }

    public Cat(String name, int age, String color, int legs) {
        super(name, age, color, legs);
    }
    public void action(){
        super.setName("小白");
        super.setColor("白色");
        super.setAge(1);
        super.setLegs(4);
        System.out.println("宠物自白：我叫"+super.getName()+",是只"+super.getColor()+"的小猫，今年"+super.getAge()+"岁"+"有"+super.getLegs()+"条腿，现在在"+catchMouse());
    }

    public static void main(String[] args) {
        Cat cat =new Cat();
        cat.action();
    }
}
